package com.black.cat.bean;

import com.black.cat.factory.FactoryBean;

/**
 * 增加对FactoryBean 的特殊处理
 */
public class FactoryBeanRegistrySupport extends DefaultSingletonBeanRegistry {

    protected Object getObjectFromFactoryBean(FactoryBean<?> factory, String beanName, boolean shouldPostProcess) {
        Object object;
        try {
           object = factory.getObject();
        } catch (Exception e) {
            e.printStackTrace();
            return null;
        }
        return object;
    }
}
